<?php
	@require_once("config.php");
	$list = $_GET["list"];  //goodlist_1
	$sql = "select * from `$list`";
//	echo $sql ;
	
	$result = mysql_query($sql);
	
	$all = array();
	while($item = mysql_fetch_assoc($result)){
		$arr = array();
        $arr["goods_id"] = $item["goods_id"];
        $arr["goods_title"] = $item["goods_title"];
        $arr["goods_price"] = $item["goods_current_price"];
        $arr["goods_trade_num"] = $item["goods_trade_num"];
        $arr["goods_pic"] = $item["goods_pic"];
        $arr["goods_sub_pic"] = explode(",", $item["goods_sub_pic"]);
        $arr["type"] =  $item["type"];

        $all[] = $arr;
	}
	echo  json_encode($all);
?>